package com.briup.service.impl;

import com.briup.bean.OrderForm;
import com.briup.dao.OrderFormMapper;
import com.briup.service.IOrderFormService;
import com.briup.util.MyBatisSqlSessionFactory;

import java.util.List;

/**
 * @author 王若龙
 * @CreateTime 2022-09-27 23:34
 */
public class IOrderFormServiceImpl implements IOrderFormService {

    private OrderFormMapper orderFormMapper = MyBatisSqlSessionFactory.openSession(true).getMapper(OrderFormMapper.class);
    @Override
    public void saveOrderForm(OrderForm of) {
        orderFormMapper.saveOrderForm(of);
    }

    @Override
    public OrderForm findOrderFormByOrderid(Integer orderid) {
        return orderFormMapper.findOrderFormByOrderid(orderid);
    }

    @Override
    public List<OrderForm> findOrderFormByCustomerId(Integer id) {
        return orderFormMapper.findOrderFormByCustomerId(id);
    }

    @Override
    public void deleteOrderFormById(Integer id) {
        orderFormMapper.deleteOrderFormById(id);
    }
}
